package com.qf.Entity;

/*2021/10/9*/public class Page {
    private Integer pageIndex;
    private Integer startRow;
    private Integer pageSize;
    private Long totalCount;
    private Long totalPage;

    public Page(Integer pageIndex) {
        this.pageIndex = pageIndex;
        this.pageSize=4;
        this.startRow=(this.pageIndex-1)*this.pageSize;
    }

    public Page() {
    }

    public void setTotalCount(Long totalCount) {
        this.totalCount = totalCount;
        this.totalPage=this.totalCount%this.pageSize==0?this.totalCount/this.pageSize:this.totalCount/this.pageSize+1;
    }

    public Integer getPageIndex() {
        return pageIndex;
    }

    public Integer getStartRow() {
        return startRow;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public Long getTotalCount() {
        return totalCount;
    }

    public Long getTotalPage() {
        return totalPage;
    }
}
